<script setup>
import {onMounted} from "vue"
import {isLogin} from "@/api/user"
import {useStore} from "@/pinia/index"
import {useRouter} from "vue-router"
const store=useStore()
const router=useRouter()
onMounted(()=>{
	if(store.isLogin){
		isLogin().then(res=>{
		console.log("res:",res);
		if(res.code!==0){
			store.exitLogin()
			router.push("/login")
		}
	})
	}
})
</script>

<template>
	<router-view></router-view>
</template>

<style>
</style>
